package com.icesnowsun.app.msg.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.icesnowsun.app.user.entity.User;
import ncme.auto.framework.core.annotations.entity.foreign.ForeignField;
import ncme.auto.framework.core.entities.AutoBaseEntity;
import ncme.auto.framework.core.annotations.entity.*;
import ncme.auto.framework.core.annotations.*;
import ncme.auto.framework.core.mybatisExtend.typeHandler.DateTypeHandler;

import java.util.Date;

@TableName("msg_message")
public class Message extends AutoBaseEntity {

    @ForeignField(foreignClass = User.class, fieldName = "id")
    @TableField(value = "`sender_id`")
    private Integer senderId;

    @ForeignField(foreignClass = User.class, fieldName = "id")
    @TableField(value = "`receiver_id`")
    private Integer receiverId;

    @TableField(value = "`send_time`",typeHandler = DateTypeHandler.class)
    private String sendTime;

    @AllowNull
    @TableField(value = "`content_type`")
    private String contentType;

    @AllowNull
    @TableField(value = "`content`")

    private String content;

    public Integer getSenderId() {
        return senderId;
    }

    public void setSenderId(Integer senderId) {
        this.senderId = senderId;
    }

    public Integer getReceiverId() {
        return receiverId;
    }

    public void setReceiverId(Integer receiverId) {
        this.receiverId = receiverId;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

}
